-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speedup of mkFit hit converters, and introduction of mkFit HLT customization for 2025 #47106
Conversation
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47106/43294 |
A new Pull Request was created by @mmasciov for master. It involves the following packages:
@cmsbuild, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
do you know why |
I'm curious, what is the timing reduction measured using the framework report or the |
https://stackoverflow.com/questions/32435796/when-to-use-stdhypotx-y-over-stdsqrtxx-yy Looks like builtin overflow / underflow checks slow it down? |
When running the same HLT configuration on the same machine, I had checked the |
+1 Size: This PR adds an extra 112KB to repository Comparison SummarySummary:
|
What's the final customization function to be applied on top of the HLT menu for testing purposes? |
Correct. As mentioned at today's TSG meeting, I'm going to push a new commit, renaming |
…h new customization function targeting 2025
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47106/43325 |
Pull request #47106 was updated. @cmsbuild, @jfernan2, @mandrenguyen can you please check and sign again. |
please test |
Isn't the printout buggy in the E.g. the topmost line |
Could you copy that comment to #43166 ? |
+1 Size: This PR adds an extra 20KB to repository Comparison SummarySummary:
|
FWIW, I run HLT integration tests using this branch adding the following patch on top: diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
index 3f800fab933..c7f59ec0e70 100644
--- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
+++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py
@@ -181,5 +181,8 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
process = customizeHLTfor47079(process)
process = customizeHLTfor47047(process)
+ from RecoTracker.MkFit.customizeHLTIter0ToMkFit import customizeHLTIter0ToMkFit
+ process = customizeHLTIter0ToMkFit(process)
+
return process
by running
The full log is available here, while the results are here. |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @antoniovilela, @mandrenguyen, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR aims at speeding up the mkFit (input) converters and the mkFit producer, targeting HLT in 2025:
-
RecoTracker/MkFit/plugins/MkFit*HitConverter.cc
andconvertHits.h
: save mkFit layer index per hit to be used for a fasterMkFitEventOfHitsProducer
; use more variables available for a givenDet
to avoid their recomputation per hit (including hit local->global conversion); access clusters from the reference collection by index directly instead of dereferencing anOmniClusterRef
-
RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc
uses pre-computed per-hit layer index-
RecoTracker/MkFit/plugins/MkFitProducer.cc
(and customization functions) : disable (by config) additional/redundant re-check of the input cluster charge (already applied during the hit creation); this should work OK for an mkFit setup where CCC is the same in all iterations-
RecoTracker/MkFitCore/interface/Hit.h
: vdt, replace (slow)std::hypot
with explicitsqrt(x*x+y*y)
; useSMatrixSym33
for direct covariance storage to avoid conversion fromSVector6
-
RecoTracker/MkFitCore/src/MkFinder.cc
,RecoTracker/MkFitCore/src/MkFitter.cc
,RecoTracker/MkFitCore/src/PropagationMPlex*.cc
,RecoTracker/MkFitCore/src/Track.cc
vdt, replace (slow)std::hypot
with explicitsqrt(x*x+y*y)
Timing reduction (based on callgrind) in MC ttbar with PU using mkFit at HLT configuration is overall ~30% in mkFit-related modules:
MkFitEventOfHitsProducer
: -40%MkFitSiStripHitConverter
: -35%MkFitSiPixelHitConverter
: -40%MkFitProducer
: -14% (7% is the faster math, 7% from not updating the cluster mask with CCC)For testing of the HLT configuration, PR cms-data/RecoTracker-MkFit#15 is required.
PR validation:
This PR was validated using both offline and HLT configurations.
For offline: http://uaf-10.t2.ucsd.edu/~mmasciov/MIC/HLTTracking/offlineMTV_TTbarPU_2024_PR155/
--> Only differences are at the level of fluctuations, consistently with the proposed changes.
FYI: @cms-sw/tracking-pog-l2, @slava77, @mtosi, @missirol